# -*- coding: utf-8 -*-
class Foo:
    def p(self):
        print "Foo"

class Bar:
    def p(self):
        print "Bar"

list = []
for i in range(5):
    list.append(Foo())
    list.append(Bar())

for object in list:
    object.p()
